//
//  HotelDetailCell.m
//  HubeiHotel
//
//  Created by 张露杰 on 18/3/14.
//  Copyright © 2018年 张露杰. All rights reserved.
//

#import "HotelDetailCell.h"

@implementation HotelDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    //    继承父类
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = 0;
    }
    return self;
}

-(void)loadCellWithData:(NSDictionary *)data
{
    //    重新布局
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }
    
    UILabel *detailLabel = [UILabel new];
    detailLabel.textColor = TextBlack;
    detailLabel.font = [UIFont systemFontOfSize:13*screenW_6];
    detailLabel.text = data[@"introduce"];
    detailLabel.numberOfLines = 0;
    [self.contentView  addSubview:detailLabel];
    [detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView ).offset(15*screenW_6);
        make.top.equalTo(self.contentView.mas_top).offset(15*screenW_6);
        make.width.equalTo(@(SCREENW-30*screenW_6));
    }];
    [detailLabel setLineSpaceWithLineSpacing:14*screenW_6 text:data[@"introduce"]];
}

@end
